<template>
  <div class="tab_home">
    <van-nav-bar
      title="我的订单"
      left-text="返回"
      left-arrow

      @click-left="onClickLeft"

    />
    <van-tabs v-model="active" sticky>
      <van-tab title="待付款"><orders-unpay/></van-tab>
      <van-tab title="待收容器"><orders-unreceive/></van-tab>
      <!--<van-tab title="寄样本">内容 3</van-tab>-->
      <van-tab title="查看报告"><orders-toreport/></van-tab>
    </van-tabs>
  </div>
</template>

<script>
import { Tabs, Tab, NavBar } from 'vant'
import OrdersUnpay from './orders-unpay'
import OrdersUnreceive from './orders-unreceive'
import OrdersToreport from './orders-toreport'

export default {
  components: {
    [Tabs.name]: Tabs,
    [Tab.name]: Tab,
    [NavBar.name]: NavBar,
    [OrdersUnpay.name]: OrdersUnpay,
    [OrdersUnreceive.name]: OrdersUnreceive,
    [OrdersToreport.name]: OrdersToreport
  },
  data () {
    return {
      active: 0
    }
  },
  mounted () {
    const type = this.$route.query.type
    this.active = type
  },
  methods: {
    onClickLeft () {
      this.$router.go(-1)
    }
  }
}
</script>

<style scoped>

</style>
